//Vue基础资源
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

//图片懒加载
import VueLazyload from 'vue-lazyload'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import 'element-ui/lib/theme-chalk/display.css';

Vue.use(ElementUI)
Vue.use(VueLazyload,{
	error: require('assets/image/error.jpg'),
	loading: require('assets/image/loading.gif'),
	attempt: 40
})

Vue.config.productionTip = false
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')


//引入基础资源
import('assets/js/iconfont')
import('assets/css/base.css')

//rem移动端适配
restSetFontSize()
window.addEventListener('resize',restSetFontSize)
function restSetFontSize() {
	let htmlwidth=document.documentElement.clientWidth || document.body.clientWidth
	document.querySelector('html').style.fontSize = htmlwidth / 19.2 + 'px'
}
